<template>
  <div class="box">测试</div>
  <button @click="add">
    操作
  </button>
</template>
<script>
import { Stack, Element } from './Stack.js'
export default {
  data() {
    return {}
  },
  methods: {
    add() {
      console.log(`helloworld`)
    }
  },
  mounted() {
    let s = new Stack()
    let list = ['x', 'a', 'a', 'a-1', 'a-1', 'a-1', 'a', 'b', 'b-1', 'c', 'y'].map((res) => {
      return {
        type: res
      }
    })
    //['x','a','b','c','y']
    list.forEach((res) => {
      console.log(res)
      s.push(res)
    })
    console.log(s)
  }
}
</script>
<style type="text/css">
.box {
  width: 100px;
  height: 100px;
  border: 1px solid #000;
}
</style>
